package com.xywy.bloodandroid.act;

import android.os.Bundle;
import android.os.CountDownTimer;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.xywy.bloodandroid.R;
import com.xywy.bloodandroid.base.BaseActivity;


public class QuestionSucessAct extends BaseActivity {
	private RelativeLayout left_img;
	private  TextView middle_title;
//	private TextView right_title;
//	private ImageView right_img;
	private TextView time_task;
	private TextView textView1;
	@Override
	protected void initView(Bundle savedInstanceState) {
		setContentView(R.layout.act_questin_sucess);
       int mark=getIntent().getIntExtra("mark", -1);
        left_img = (RelativeLayout) findViewById(R.id.left_img);
		middle_title = (TextView) findViewById(R.id.middle_title);
//		right_title = (TextView) findViewById(R.id.right_title);
//		right_img = (ImageView) findViewById(R.id.right_img);
		left_img.setVisibility(View.INVISIBLE);
				
		textView1 = (TextView) findViewById(R.id.textView1);
		
		if(mark==100){
			
			middle_title.setText(getResources().getString(R.string.question_sucess));
		}else{
			middle_title.setText(getResources().getString(R.string.commit_form_sucess));
			textView1.setText(getResources().getString(R.string.quesstion_ask_text_other));
		}
        
        time_task = (TextView) findViewById(R.id.time_task);
        
        new CountDownTimer(5000, 1000) {

			public void onTick(long millisUntilFinished) {

				time_task.setText("请静心" + millisUntilFinished
						/ 1000 + "秒...)");
			}

			public void onFinish() {
				QuestionSucessAct.this.finish();
			}
		}.start();
	}
	
	


	@Override
	protected void initListener() {

	}

	@Override
	protected void initData() {

	}
	@Override
	protected void onDestroy() {
		super.onDestroy();
		
	}

}
